<template>
  <div>
    <img src="https://klcx-bucket.oss-cn-beijing.aliyuncs.com/klcx-xcx/ico/img_bg2.jpg" class="img3"/>
    <div style="text-align: center;" class="text1">
      <text class="tip1">您有未完成的订单，请前往</text>
      <br><text class="tip1">处理后再用车</text>
    </div>
    <div class="view">
      <button class="btn pass fix" @click="getCostDetail">查看订单详情</button>
    </div>


  </div>
</template>

<script>
  import Service from '@/utils/service'

  export default {
    data () {
      return {
        orderNo: ''
      }
    },
    onLoad(options) {
      this.orderNo = options.orderNo
    },
    methods: {
      getCostDetail() {
        let data = {
          orderNo: this.orderNo
        }
        Service.getCostDetail(data).then((res) => {
          if (res.code == 200) {
            let data = res.data
            data.orderNo = this.orderNo
            let travelInfo = JSON.stringify(data)
            wx.reLaunch({
              url: '../waitPay/main?travelInfo='+travelInfo
            })
          } else if (res.code == 300) {
            wx.reLaunch({
              url: '../paySuccess/main?orderNo='+this.orderNo
            })
          }
        })
      },
    }
  }
</script>

<style scoped>
  .view{
    text-align: center;
  }
  .text1{
    margin-top: 118rpx;
  }
  .img3{
    width: 100%;
    height: 520px;
  }
  .tip1{
    line-height: 46rpx;
    font-size: 36rpx;
    margin-bottom: 0;
    color: #333;
  }

</style>
